import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/Layout'
import Login from '@/views/Login'

Vue.use(VueRouter)

const routes = [
  { // 重定向路由
    path: '/',
    redirect: '/login'
  },
  { // 设置登录界面
    name: 'login',
    path: '/login',
    component: Login
  },
  {
    name: 'layout',
    path: '/layout',
    component: Layout
  }
]

const router = new VueRouter({
  routes
})

export default router
